<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
      /*子孙后台选择器*/
     /*body div div p{
         width: 30px;
         color: red;
         border: 1px solid red ;
     }*/
      /*子元素选择器*/
      body>div>div>p{
          color: red;
      }
      /*伪类选择器*/
      a:link{          /*未访问*/
          color: red;
      }
      a:visited{        /*访问过*/
          color: rebeccapurple;
      }
      a:hover{         /*悬停*/
          color: green;
      }
      a:active{   /*点击状态*/
          color: yellow;
      }
  </style>
</head>
<body>
<a href="www.baidu.com">超链接1</a>
<a href="http://www.qq.com">超链接2</a>
<a href="http://doc.canglaoshi.org">超链接3</a>
<p>p1</p>
<div>
  <p>p2</p>
  <div><p>p3</p></div>
  <div>
    <p>p4</p>
    <div><p>p5</p></div>
  </div>
</div>
</body>
</html>